<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th><input type="checkbox" class="checked-all" target="exchange-id"></th>
            <th>采购员</th>
            <th>审批状态</th>
            <th>换货状态</th>
            <th><div class="text-left">采购单号</div></th>
            <th><div class="text-left">换货单号</div></th>
            <th><div class="text-left">供应商</div></th>
            <th>仓库</th>
            <th>物流公司</th>
            <th>运费方式</th>
            <th>追踪号</th>
            <th>运费</th>
            <th>是否付款</th>
            <th>换货原因</th>
            <th>录入时间</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {volist name="list" id="item"}
            <tr>
                <td><input type="checkbox" class="exchange-id" name="exchange_id[]" value="{$item.exchange_id}"></td>
                <td>{$item.purchase.buyer.nickname}</td>
                <td>{$item.check_status}</td>
                <td>{$item.status}</td>
                <td class="text-left copy-text">{$item.purchase.purchase_sn}</td>
                <td class="text-left copy-text">{$item.exchange_sn}</td>
                <td class="text-left">{$item.purchase.producer_name}</td>
                <td>{$item.purchase.warehouse.name}</td>
                <td>{$item.logistics_name}</td>
                <td>{$item.pay_type}</td>
                <td class="copy-text">{$item.track_num}</td>
                <td>{$item.logistics_price|abs}</td>
                <td>
                    <span class="{$item.is_pay?'text-yellow':'text-muted'}"><i class="fa fa-circle"></i> {$item.is_pay?'是':'否'}</span>
                </td>
                <td>{$item.desc}</td>
                <td>{$item.create_time}</td>
                <td class="text-left">{$item.remark}</td>
                <td class="text-left">
                    <a class="layui-btn layui-btn-xs layui-btn-normal ajax-form" width-form="80%" height-form="80%"  title="采购单换货" href="{:url('info', ['exchange_id' => $item['exchange_id']])}">查看</a>
                    {if $is_show_check && \app\common\model\JobFlowModule::isCheckIng($item) && $item->getData('status') != $status_cancel}
                    <a class="layui-btn layui-btn-xs check-job-flow" item="{$item.exchange_id}">审批</a>
                    {/if}
                    {if  $item->getData('status') < $status_out}
                    <a class="layui-btn layui-bg-cyan layui-btn-xs ajax-get" title="取消" confirm="1"  href="{:url('cancel', ['ids' => $item['exchange_id']])}">取消</a>
                    {/if}
                </td>
            </tr>
        {/volist}
        {empty name="list"}
        <tr>
            <td colspan="17">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>
<div class="page">
    {$page|raw}
</div>